<script setup lang="ts">
import ChannelNav from './components/ChannelNav.vue'
import ArticleList from './components/ArticleList.vue'
import { ref } from 'vue'
// 当前的频道信息
const channelID = ref(0)

const changeId = (id: number) => {
  console.log(id)
  channelID.value = id
}
</script>

<template>
  <!-- 顶部的 频道 -->
  <ChannelNav :channelID="channelID" @changeChannelID="changeId"></ChannelNav>
  <!-- 文章的列表 -->
  <ArticleList :channelID="channelID"></ArticleList>
</template>
